home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
nrpas13.arc
/
DF1DIM.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-05-01
|
549b
|
25 lines
FUNCTION df1dim(x: real): real;
(* Programs using routine DF1DIM must define the type
TYPE
glnarray = ARRAY [1..n] OF real;
They must also define the variables
VAR
ncom: integer;
pcom,xicom: glnarray
in the main routine, and externally assign them values. *)
VAR
df1: real;
j: integer;
xt,df: glnarray;
BEGIN
FOR j := 1 TO ncom DO BEGIN
xt[j] := pcom[j]+x*xicom[j]
END;
dfunc(xt,df);
df1 := 0.0;
FOR j := 1 TO ncom DO BEGIN
df1 := df1+df[j]*xicom[j]
END;
df1dim := df1
END;